#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;

int range, n;
int v[1010];
bool flag[1010];
int  ans;

bool in()
{
    int k, a;
    memset(flag, false, sizeof(flag));
    scanf("%d%d", &range, &k);
    if (range==-1 && k==-1) return false;
    n = 0;
    while (k--)
    {
        scanf("%d", &a);
        if (flag[a]==false) 
        {
            v[n++] = a;
            flag[a] = true;
        }    
    }    
    return true;
}    

void put()
{
    int st=v[0], to;
    int k=0;
    while (k!=n)
    {
        to = st;
        while (to-st <= range && k!=n)
        {
            k++;
            to = v[k];
        }  
        k--;  
        to = v[k];
        ans ++;
        while (v[k]-to<=range && k<n) k++;
        st = v[k];
    }        
}    

void deal()
{
    ans = 0;
    sort(v, v+n);
    put();
}    

int main()
{
    while (in())
    {
        deal();
        printf("%d\n", ans);
    }    
    
    return 0;    
}    
